<div id="content">

<?php if (isset($_SESSION['user_id']) && $_SESSION['name'] != "admin") {
    if (count($selectedRiasec) == 0) { ?>
        <div class="contentBody">
            <div class="left">
                <h1>Personality Test Not Taken</h1><br/>
                <div><a href="<?php echo site_url('riasec_manga'); ?>">Click here to take Personality Test</a>
                </div>
            </div>
        </div>
<?php
    }
?>
<div class="contentBody">
        <div class="left">
                <?php if (count($selectedCourse) != 0) {
                ?>
                <h2 align="left">Your Selected Course:</h2>
                            <ul>
            <?php foreach ($selectedCourse as $row) {
            ?>
                        <li><?php echo $row->course_name; ?></li>
            <?php }?>            </ul><?php  } else {
                    echo "<br/><br/><h1>Course Not Yet Selected</h1><br/>";
            ?>
                    <div><a href="<?php echo site_url('course_selection/home'); ?>">Click Here To Select Course</a>
                    </div>

            <?php   } ?>
        </div>
</div>
<?php } ?>
<div class="contentBody">
<!--Institution Selection-->
<div id="institutionSearch" class="left">
    <br/>
    <br/>
    <?php if(isset($_SESSION['user_id']) && $_SESSION['name'] == 'admin'){
           $text = "Institution Maintenance";
           $insert ="<a href=".site_url('maintain_institution/insertField')." onmouseover=this.style.color='#1569C7' onmouseout=this.style.color='#FF8040' style=color:#FF8040>Create a New Education Institute</a>";
    }else{
           $text = "Institution List";
           $insert ="";
    }?>
    <h1><?php echo $text; ?></h1>
    <hr>
    <br/>
    <?php echo $insert;?>
    <form id="searchForm" action="<?php echo site_url('institution_selection/searchresult'); ?>" method="POST">
        <input type="hidden" id="url1" value="<?php echo site_url('institution_selection/selectlist'); ?>">
        <table>
            <tr>
                <th>Search Institution</th>
                <td>
                    <select id="country" name="country" style="font-size:12px;">
                        <option value="countrynull">-Country-</option>
                        <?php
                        foreach ($country_list as $row) {
                        ?>
                            <option value="<?php echo $row->country_id; ?>"><?php echo $row->country_name; ?></option>
                        <?php
                        }
                        ?>
                    </select>
                </td>
                <td>
                    <select id="EduInstitution" name="institutionList" id="institutionList" style="font-size:12px;" >
                        <option value="cat">Search By</option>
                        <option value="InsType">Institution Type</option>
                        <option value="InsName">Institution Name</option>
                        <option value="Course">Course Name</option>
                    </select>
                </td>
                <td id="searchList"></td>
                <td id="textbox"><input type="text" id="keyword" name="keyword" size="15"/></td>
                <td><input type="submit" id="Filter" value="Filter"/></td>
            <tr/>
        </table>
    </form>
</div>
</div>
<?php if (isset($_SESSION['user_id']) && $_SESSION['name'] != "admin") {?>
<div class="contentBody">
<div class="left">
                                <!-- show the search result table-->
                                <div id="insTable" class="left">
                                        <?php if (count($selectedIns) != 0) {?>
                      <table width="650px" cellspacing="0px" id="infoTable" >
                                        <form name="selForm" id="selForm" action="">
                                            <h2  style="font-size:large"><u>Your Selected Institution:</u></h2>
                                            <?php foreach ($selectedIns as $row) { ?>
                                                <tr>
                                                <td width="20px"><input type="checkbox" name="ins_id[]" value="<?php echo $row->institution_id; ?>"></td>
                                                <td><?php echo $row->institution_name; ?></td>
                                                </tr>
                                            <?php
                                            } ?>
                                            </form>
                                            </table>
                                            <br/>
                                            <input type="button" id="markAll" name="markAll" value="Mark All/Un-mark All"
                                                   onmouseover="this.style.color='#FF8040'; this.style.textDecoration='underline'"
                                                   onmouseout="this.style.color='#1569C7'; this.style.textDecoration='none'">
                                            <input type="button" name="remove" id="remove" value="Remove"
                                                   onmouseover="this.style.color='#FF8040'; this.style.textDecoration='underline'"
                                                   onmouseout="this.style.color='#1569C7'; this.style.textDecoration='none'">
                                            <input type="hidden" id="url5" value="<?php echo site_url('institution_selection/institutionRemove');?>">
                                        <?php } else {
                                            echo "You have not done any selection for institution";}
                                            ?>
            </div>
<center><p id="HSinfo" onmouseover="this.style.color='blue'; this.style.textDecoration='underline';"
                    onmouseout="this.style.color='orange'; this.style.textDecoration='none';"
                    style="color:orange">Hide-Show</p></center>
    </div>
</div>
                                            <?php } ?>

</div>